// 支付类型数据表
'use strict';

module.exports = (sequelize, DataTypes) => {
  var PaymentMethod = sequelize.define('PaymentMethod', {
    id: {
      type: DataTypes.INTEGER,
      autoIncrement: true,
      primaryKey: true
    },
    name: DataTypes.STRING,  // 支付名称
    code: DataTypes.STRING,  // 支付标识
    version: DataTypes.STRING,  // 向上兼容版本
    isUsing: {  // 支付方式启用状态
      type: DataTypes.BOOLEAN,
      defaultValue: false
    }
  }, {});
  PaymentMethod.associate = function (models) {
    // associations can be defined here
  };
  PaymentMethod.sync({ alter: true })
  return PaymentMethod;
};